import { usePermissStore } from '@/store/permiss' 

export default (app)=>{
    //定义debounce指令  
    app.directive('permiss',{
        async mounted(el, binding){
            const store = usePermissStore()
            const roleList = await store.getRole()
            if(roleList && !roleList.includes(binding.value)){
                el['hidden'] = true
            }
            //el:指令绑定的那个元素 img
            //binding: binding.value 指令等于号后面绑定的表达式的值
            // 获取传递给指令的参数
        }
    }
)}